home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World Komputer 2001 December
/
pcwk12201b.iso
/
Wersje pelne i specjalne
/
Winamp 2.77 i 3.0beta
/
wasabi-sdk_beta1.exe
/
studio
/
generic
/
generic.h
< prev
next >
Wrap
C/C++ Source or Header
|
2001-10-08
|
2KB
|
85 lines
#ifndef _GENERIC_H //EDITME
#define _GENERIC_H //EDITME
#include "../studio/wac.h"
#include "../common/SimpleWndCreate.h"
class GenericWnd;
#define WACNAME WACgeneric //EDITME
#define WACPARENT WAComponentClient
class WACNAME : public WACPARENT {
public:
WACNAME();
virtual ~WACNAME();
virtual const char *getName();
virtual GUID getGUID();
virtual void onCreate();
virtual void onDestroy();
virtual void onRegisterServices();
virtual RootWnd *createWindow(int n, RootWnd *parentWnd);
int destroyWindow(RootWnd * deadWnd);
ThingerBitmapInfo getThingerBitmapInfo();
//
// ===========================================================================
// ===========================================================================
//
// These items are needed for our component to be used as a Window Creation
// object.
public:
static WACNAME & Main() {
// Make that instance available as a static item.
return * myInstance;
}
//
// Therefore, if we wish, we can call down to that instance
// to handle any of the necessary function calls required by
// the template. Hooray for legacy code support.
//
//
// The rest of the methods listed here are the required static
// methods for any object that is passed into the above template.
//
// =========================================================================
//
static const char *getWindowNameStatic() {
return Main().getName();
}
//
static GUID getGUIDStatic() {
return Main().getGUID();
}
//
static RootWnd *createWindowStatic(int n, RootWnd *parentWnd) {
return Main().createWindow(n, parentWnd);
}
//
static int destroyWindowStatic(RootWnd *deadWnd) {
return Main().destroyWindow(deadWnd);
}
//
// If you are going to be using the Thinger template,
// you also must provide the following method:
//
static ThingerBitmapInfo getThingerBitmapInfoStatic() {
return Main().getThingerBitmapInfo();
}
private:
static WACNAME * myInstance;
// ===========================================================================
private:
// fill in your private data here
GenericWnd *wnd;
};
#endif